import urllib
import urllib2
import base64

url = "http://ctf5.shiyanbar.com/web/10/10.php"
res = urllib2.urlopen(url)
#print res.read()
flag = res.info().getheader("flag")
key = base64.b64decode(flag)
pos = key.find(":")
real_key = key[pos+1:]


test_data = {'key':real_key}
test_data_urlencode = urllib.urlencode(test_data)
req = urllib2.Request(url = url,data =test_data_urlencode)
res_data = urllib2.urlopen(req)
res = res_data.read()
print res
